﻿@model MyMVCDemo.Controllers.Student1

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>


<form action="/AjaxFormDemo/Index" method="post" id="myform">
    @Html.ValidationSummary(true)
    <div id="divResults"></div>
    <fieldset>
        <legend>Student</legend>
        
        <div class="editor-label">
            @Html.LabelFor(model => model.FirstName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.FirstName)
            @Html.ValidationMessageFor(model => model.FirstName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.LastName)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.LastName)
            @Html.ValidationMessageFor(model => model.LastName)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Age)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Age)            
            @Html.ValidationMessageFor(model => model.Age)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
</form>



<div>
    @Html.ActionLink("Back to List", "Index")
</div>

<script src="../../Scripts/form1.js" type="text/javascript"></script>
